﻿/***************************************************************************
//* Foxit Software Inc.
//* Copyright(C) 2005-2012, all rights reserved.
//*
//* The following code is copyrighted and contains proprietary information
//* and trade secrets of Foxit Software Inc.                                                      *
***************************************************************************/
/**
* PDF Annot Action 类
*/

define(function (require, exports, module) {
    var CPDF_DestInfo = require('./Dest');

    FXREADER.PDFData.AnnotActionJsonFormat = {
        ActionType: "ty",
        Dest: "ds",
        URI: "uri"
    };
    var ActionDataFmt = FXREADER.PDFData.AnnotActionJsonFormat;
    var Action = function (jsonData) {
        this.m_ActionData = jsonData;
        this.Dest = null;
    };

    Action.prototype.GetActionType = function () {
        return this.m_ActionData[ActionDataFmt.ActionType];
    }

    Action.prototype.GetDest = function () {
        if (this.Dest == null) {
            this.Dest = new CPDF_DestInfo(this.m_ActionData[ActionDataFmt.Dest]);
        }
        return this.Dest;
    }

    Action.prototype.GetURI = function () {
        return this.m_ActionData[ActionDataFmt.URI];
    }

    FXREADER.PDFData.CPDF_Action = Action;
    return FXREADER.PDFData.CPDF_Action;

});